<div class="mailinglists index">
	<h2><?php echo __('Mailing List'); ?></h2>
	<table cellpadding="0" cellspacing="0">
	<tr>

			<th><?php echo $this->Paginator->sort('FirstName', 'First Name'); ?></th>
			<th><?php echo $this->Paginator->sort('LastName', 'Last Name'); ?></th>
			<th><?php echo $this->Paginator->sort('Email', 'Email'); ?></th>

<!--not shown to user
			<th><?php echo $this->Paginator->sort('ListID'); ?></th>
-->
	</tr>
	<?php foreach ($mailinglists as $mailinglist): ?>
	<tr>

		<td><?php echo h($mailinglist['Mailinglist']['FirstName']); ?>&nbsp;</td>
		<td><?php echo h($mailinglist['Mailinglist']['LastName']); ?>&nbsp;</td>
		<td><?php echo h($mailinglist['Mailinglist']['Email']); ?>&nbsp;</td>

<!--not shown to user
		<td><?php echo h($mailinglist['Mailinglist']['ListID']); ?>&nbsp;</td>

-->
	<div id="mybuttons">
	<td class="myButtons">
	    <?php
            if($this->Session->read('login')=='yes')
            {
            	echo $this->Html->image("view-btn.jpg", array( "alt" => "View", 'url' => array('action' => 'view', $mailinglist['Mailinglist']['ListID']))); 
                echo $this->Html->image("edit-btn.jpg", array( "alt" => "Edit", 'url' => array('action' => 'edit', $mailinglist['Mailinglist']['ListID']) ));
				echo $this->Form->postLink($this->Html->image("delete-btn.jpg", array('alt' => __('Delete'))), array('action' => 'delete', $mailinglist['Mailinglist']['ListID']), array('escape' => false), __('Are you sure you want to delete #%s?', $mailinglist['Mailinglist']['ListID']));
            }

			else{
				echo $this->Html->image("view-btn.jpg", array( "alt" => "View", 'url' => array('action' => 'view', $mailinglist['Mailinglist']['ListID']))); 
			}
				
			?>
		</td>
		</div>
	</tr>
	
	
<?php endforeach; ?>
	</table>
	<p>
	<?php
	echo $this->Paginator->counter(array(
	'format' => __('Page {:page} of {:pages}, showing {:current} records out of {:count} total, starting on record {:start}, ending on {:end}')
	));
	?>	</p>
	<div class="paging">
	<?php
		echo $this->Paginator->prev('< ' . __('previous'), array(), null, array('class' => 'prev disabled'));
		echo $this->Paginator->numbers(array('separator' => ''));
		echo $this->Paginator->next(__('next') . ' >', array(), null, array('class' => 'next disabled'));
	?>
	</div>

	<?php echo $this->Html->link(__('Add Address'), array('action' => 'add')); ?>
</div>



